<!-- 联系我们信息卡片模块 -->
<section id="<?= $data['type'] ?? 'contact' ?>" class="py-16" style="background-color: <?= $data['styles']['backgroundColor'] ?? '#F8F9FA' ?>">
  <div class="container mx-auto px-4 sm:px-6 lg:px-8">
    <div class="text-center max-w-2xl mx-auto mb-12">
      <?php if (isset($data['content']['sectionBadge'])): ?>
        <div class="inline-block px-4 py-1 bg-primary/10 text-primary rounded-full text-sm font-medium mb-4">
          <?= $data['content']['sectionBadge'] ?>
        </div>
      <?php endif; ?>
      <h2 class="text-[clamp(1.5rem,3vw,2.5rem)] font-bold text-dark mb-4">
        <?= $data['content']['sectionTitle']?>
      </h2>
      <p class="text-dark/70">
        <?= $data['content']['sectionSubtitle']?>
      </p>
    </div>
    
    <?php if (isset($data['content']['contactInfo'])): ?>
      <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8">
        <?php foreach ($data['content']['contactInfo']['items'] as $item): ?>
          <div class="bg-white p-6 rounded-xl shadow-md hover:shadow-lg transition-custom text-center">
            <div class="w-16 h-16 mx-auto bg-primary/10 rounded-full flex items-center justify-center mb-6">
              <i class="fa fa-<?= $item['type'] == 'phone' ? 'phone' : ($item['type'] == 'email' ? 'envelope' : ($item['type'] == 'address' ? 'map-marker' : 'clock-o')) ?> text-primary text-2xl"></i>
            </div>
            <h3 class="text-xl font-bold mb-3"><?= $item['label'] ?></h3>
            <?php if ($item['type'] == 'phone'): ?>
              <a href="tel:<?= str_replace('-', '', $item['value']) ?>" class="text-primary hover:underline font-medium">
                <?= $item['value'] ?>
              </a>
            <?php elseif ($item['type'] == 'email'): ?>
              <a href="mailto:<?= $item['value'] ?>" class="text-primary hover:underline font-medium">
                <?= $item['value'] ?>
              </a>
            <?php else: ?>
              <p class="text-primary font-medium">
                <?= $item['value'] ?>
              </p>
            <?php endif; ?>
          </div>
        <?php endforeach; ?>
      </div>
    
      <!-- 社交链接 -->
      <?php if (isset($data['content']['contactInfo']['socialLinks']) && !empty($data['content']['contactInfo']['socialLinks'])): ?>
        <div class="mt-12 text-center">
          <p class="text-dark mb-4">关注我们</p>
          <div class="flex justify-center space-x-4">
            <?php foreach ($data['content']['contactInfo']['socialLinks'] as $link): ?>
              <a href="<?= $link['url'] ?>" class="w-10 h-10 bg-primary/10 rounded-full flex items-center justify-center text-primary hover:bg-primary hover:text-white transition-custom">
                <i class="fa fa-<?= $link['icon'] ?>"></i>
              </a>
            <?php endforeach; ?>
          </div>
        </div>
      <?php endif; ?>
    <?php endif; ?>
    
    <!-- 联系表单 -->
    <?php if (isset($data['content']['form'])): ?>
      <div class="mt-16 bg-white p-8 rounded-xl shadow-md">
        <div class="text-center mb-8">
          <h3 class="text-2xl font-bold mb-2"><?= $data['content']['form']['title'] ?></h3>
          <p class="text-dark/70"><?= $data['content']['form']['description'] ?></p>
        </div>
        
        <form class="max-w-3xl mx-auto">
          <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
            <?php foreach ($data['content']['form']['fields'] as $field): ?>
              <?php if ($field['type'] == 'textarea'): ?>
                <div class="md:col-span-2">
                  <label for="<?= $field['name'] ?>" class="block text-dark font-medium mb-2">
                    <?= $field['label'] ?><?= $field['required'] ? ' *' : '' ?>
                  </label>
                  <textarea id="<?= $field['name'] ?>" name="<?= $field['name'] ?>" rows="<?= $field['rows'] ?? 4 ?>" 
                    class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent" 
                    <?= $field['required'] ? 'required' : '' ?>>
                  </textarea>
                </div>
              <?php elseif ($field['type'] == 'select'): ?>
                <div class="md:col-span-2">
                  <label for="<?= $field['name'] ?>" class="block text-dark font-medium mb-2">
                    <?= $field['label'] ?><?= $field['required'] ? ' *' : '' ?>
                  </label>
                  <select id="<?= $field['name'] ?>" name="<?= $field['name'] ?>" 
                    class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent" 
                    <?= $field['required'] ? 'required' : '' ?>>
                    <option value="">请选择</option>
                    <?php foreach ($field['options'] as $option): ?>
                      <option value="<?= $option['value'] ?>"><?= $option['label'] ?></option>
                    <?php endforeach; ?>
                  </select>
                </div>
              <?php else: ?>
                <div>
                  <label for="<?= $field['name'] ?>" class="block text-dark font-medium mb-2">
                    <?= $field['label'] ?><?= $field['required'] ? ' *' : '' ?>
                  </label>
                  <input type="<?= $field['type'] ?>" id="<?= $field['name'] ?>" name="<?= $field['name'] ?>" 
                    class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent" 
                    <?= $field['required'] ? 'required' : '' ?>>
                </div>
              <?php endif; ?>
            <?php endforeach; ?>
          </div>
          
          <?php if (isset($data['content']['form']['privacyNote'])): ?>
            <div class="mt-4 text-sm text-dark/70">
              <?= $data['content']['form']['privacyNote'] ?>
            </div>
          <?php endif; ?>
          
          <div class="mt-6 text-center">
            <button type="submit" class="px-8 py-3 bg-primary text-white rounded-lg hover:bg-primary/90 transition-custom font-medium">
              <?= $data['content']['form']['submitButton']['text'] ?? '提交' ?>
            </button>
          </div>
        </form>
      </div>
    <?php endif; ?>
    
    <!-- 地图 -->
    <?php if (isset($data['content']['map']) && $data['content']['map']['enabled']): ?>
      <div class="mt-16 rounded-xl overflow-hidden shadow-md" style="height: 400px;">
        <!-- 这里应该是地图容器，实际项目中需要集成地图API -->
        <div class="w-full h-full bg-gray-200 flex items-center justify-center">
          <p class="text-dark/50">地图加载中...</p>
        </div>
      </div>
    <?php endif; ?>
  </div>
</section>